package com.ostrich.note.entity;

/**
 * @Author : yaotianxue
 * @Time : On 2023/9/18 10:59
 * @Description : BaseResponseEntity
 */
public class BaseResponseEntity<T> {
    private String message;
    private int code;
    private T data;

    @Override
    public String toString() {
        return "BaseResponseEntity{" +
                "message='" + message + '\'' +
                ", code=" + code +
                ", data=" + data +
                '}';
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public BaseResponseEntity( int code,String message) {
        this.message = message;
        this.code = code;
    }

    public BaseResponseEntity(String message, int code, T data) {
        this.message = message;
        this.code = code;
        this.data = data;
    }
}
